//
//  WFSaveTool.h
//  谷居
//
//  Created by dllo on 16/6/22.
//  Copyright © 2016年 刘万方. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WFProjectModel.h"
#import "StoreSandBox.h"

@protocol WFSaveToolDelegate <NSObject>

- (void)changeLikeButtonColorWtihImageView:(UIImage *)image;

@end
@interface WFSaveTool : NSObject
+ (instancetype)shareSaveTool;

@property (nonatomic, retain) NSMutableArray *collectionArray;
@property (nonatomic, retain) NSMutableDictionary *collectionDic;

@property (nonatomic, assign) id<WFSaveToolDelegate>delegate;
//+ (void)saveToCollectionArrayWithModel:(WFProjectModel *)model;



#pragma mark - 归档方法

/** 创建判断是否已经存档的方法. */
+ (BOOL)isModekSaved:(WFProjectModel *)model;

+ (void)removeModelFromDocument:(WFProjectModel *)model;

+ (void)addModelToDocument:(WFProjectModel *)model;

+ (NSMutableArray *)getLikeArray;


//- (NSMutableArray *)read;



+ (void)saveTxtToCachesWithArray:(NSMutableArray *)array;


+ (void)savePicsToCachesWithImageArray:(NSMutableArray *)array;




- (void)open;
- (void)close;
- (void)create;
- (void)insert:(WFProjectModel *)model;
- (void)remove:(WFProjectModel *)model;
- (void)update;


@end
